<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
  <title>新增学生</title>
</head>
<body>
<h1>新增学生</h1>
<link rel="stylesheet" type="text/css" href="styles.css">
<%
  String errorMessage = (String) request.getAttribute("errorMessage");
  if (errorMessage != null && !errorMessage.isEmpty()) {
%>
<p style="color: red;"><%= errorMessage %></p>
<%
  }
%>
<form action="addStudent" method="post">
  <label>学号: <input type="text" name="id" required></label><br>
  <label>姓名: <input type="text" name="name" required></label><br>
  <label>专业: <input type="text" name="major" required></label><br>
  <input type="submit" value="新增学生">
</form>
</body>
</html>
